package com.group15.phms;

import java.util.Calendar;
import java.util.Date;

public class VitalSigns implements Comparable<VitalSigns>{
		
		private int bloodGlucose;
		private int cholesterol;
		private int systolicBP;
		private int diastolicBP;
		private Date date;
		
		VitalSigns(){
			setBloodGlucose(-1);
			setCholesterol(-1);
			setSystolicBP(-1);
			setDiastolicBP(-1);
			setDate( Calendar.getInstance().getTime() );
		}
		
		VitalSigns(int bg, int c, int sbp, int dbp, Date d){
			setBloodGlucose(bg);
			setCholesterol(c);
			setSystolicBP(sbp);
			setDiastolicBP(dbp);
			setDate(d);
		}
		
		public void setBloodGlucose(int value){ this.bloodGlucose = value; }
		public int getBloodGlucose(){ return this.bloodGlucose; }
		
		public void setCholesterol(int value){ this.cholesterol = value; }
		public int getCholesterol(){ return this.cholesterol; }
		
		public void setSystolicBP(int value){ this.systolicBP = value; }
		public int getSystolicBP(){ return this.systolicBP; }
		
		public void setDiastolicBP(int value){ this.diastolicBP = value; }
		public int getDiastolicBP(){ return this.diastolicBP; }
		
		public void setDate( Date value ){ this.date = value; }
		public Date getDate(){ return this.date; }
		
		private String bloodPressure(){ return systolicBP + "/" + diastolicBP; }
		
		@Override
		public int compareTo(VitalSigns toCompare){	return toCompare.getDate().compareTo(this.date); }
		
		public String toString(){
			return "Blood Pressure: " + bloodPressure() + "\nBlood Glucose: " + bloodGlucose +
					"\nCholestoral: " + cholesterol + "\nDate: " + date.toString();
		}

		
}
